package com.eas.web.home.module.screen.user;

import com.alibaba.citrus.turbine.Context;
import com.alibaba.citrus.turbine.TurbineRunData;
import com.eas.biz.constants.UserTypeEnum;
import com.eas.web.common.utils.WebUser;

public class ChangeSuccess {

    public void execute(TurbineRunData rundata, Context context) {
        WebUser webUser = WebUser.getWebUser(rundata);
        UserTypeEnum userType = webUser.getUserType();
        String target = "";
        switch (userType) {
        case STUDENT:
            target = "student";
            break;
        case TEACHER:
            target = "teacher";
            break;
        case COMMITTEE:
            target = "committee";
            break;
        }
        context.put("userHomeTarget", target);
    }
}
